
using UnityEngine;

public class TowerAI : TankBase
{
    public float fireOffsetTime = 1f;
    private float nowTime;
    void Start()
    {

    }
    void OnTriggerEnter(Collider other)
    {
        if (other.tag == "PlayerBullet")
        {
            BulletObject bullet = other.GetComponent<BulletObject>();
            Wound(bullet.fatherObject);
            Debug.Log(hp);
        }
    }

    // Update is called once per frame
    void Update()
    {
        nowTime += Time.deltaTime;
        if (nowTime > fireOffsetTime)
        {
            Fire();
            nowTime = 0;
        }

    }
}
